﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace SensorNetworkUI
{
    public partial class _Default : System.Web.UI.Page
    {

        protected void Button1_Click(object sender, EventArgs e)
        {




            Validate();
            if (Page.IsValid)
            {
                

                UserDataStructure user = new UserDataStructure(TextBox1.Text);
                user.Password = TextBox5.Text;
                user.Nickname = TextBox4.Text;

                Global.users.Add(user);
               //essionManager.Username=user; 
               // FormsAuthentication.SetAuthCookie(TextBox1.Text, true);
             //   Session["username"] = user;
                Response.Redirect("~/register.aspx");   



            }




        }

        protected void TextBox6_TextChanged(object sender, EventArgs e)
        {
            
        }
    }
}
